package com.hzit.bj1804.dianservice.dao;

import com.hzit.bj1804.dian.entity.Memberbase;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface MemberbaseDAO {
    int deleteByPrimaryKey(BigDecimal mid);

    int insert(Memberbase record);

    int insertSelective(Memberbase record);

    Memberbase selectByPrimaryKey(BigDecimal mid);

    int updateByPrimaryKeySelective(Memberbase record);

    int updateByPrimaryKey(Memberbase record);

    List<Memberbase> seleteAll();//查询所有会员
    Memberbase seleteByNmae(@RequestParam("mname") String mname);//根据会员名称查询会员信息
    List<Memberbase> seleteByTime(@Param("starttime") Date starttime, @Param("endtime") Date endtime, @Param("mname") String mname);//根据注册时间段和会员名称查询会员信息
    Memberbase selectByMid(@Param("mid") int mid);//根据ID来查询会员信息
    int update(@Param("mid") int mid,@Param("mstatus")String mstatus);//根据ID来改变状态
    int updatePassword(@Param("mname") String mname,@Param("newmpassword") String newmpassword);//根据会员名来修改密码
    Memberbase select(@Param("mname") String mname,@Param("mpassword") String mpassword);//根据会员名来判断密码是否正确
}